package cn.edu.scnu.springbootcinema.controller;

import cn.edu.scnu.springbootcinema.entity.User;
import cn.edu.scnu.springbootcinema.service.UserService;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
public class IndexController {
    @Resource
    UserService userService;

    @RequestMapping("/index")
    public String index() {
        return "index";
    }
    @RequestMapping("/movies")
    public String movies() {
        return "movies";
    }

    @RequestMapping("/register")
    public String register() {
        return "register";
    }
    @RequestMapping("/rankings")
    public String rankings() {
        return "rankings";
    }
    @RequestMapping("/charts")
    public String charts() {
        return "charts";
    }
    @RequestMapping("/login")
    public String login() {
        return "redirect:/user/login";
    }
}
